package com.maket.scxx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.maket.scxx.mapper.QxDefectMapper;
import com.maket.scxx.domain.QxDefect;
import com.maket.scxx.service.IQxDefectService;

/**
 * 缺陷定义Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-24
 */
@Service
public class QxDefectServiceImpl implements IQxDefectService 
{
    @Autowired
    private QxDefectMapper qxDefectMapper;

    /**
     * 查询缺陷定义
     * 
     * @param defectCode 缺陷定义主键
     * @return 缺陷定义
     */
    @Override
    public QxDefect selectQxDefectByDefectCode(String defectCode)
    {
        return qxDefectMapper.selectQxDefectByDefectCode(defectCode);
    }

    /**
     * 查询缺陷定义列表
     * 
     * @param qxDefect 缺陷定义
     * @return 缺陷定义
     */
    @Override
    public List<QxDefect> selectQxDefectList(QxDefect qxDefect)
    {
        return qxDefectMapper.selectQxDefectList(qxDefect);
    }

    /**
     * 新增缺陷定义
     * 
     * @param qxDefect 缺陷定义
     * @return 结果
     */
    @Override
    public int insertQxDefect(QxDefect qxDefect)
    {
        return qxDefectMapper.insertQxDefect(qxDefect);
    }

    /**
     * 修改缺陷定义
     * 
     * @param qxDefect 缺陷定义
     * @return 结果
     */
    @Override
    public int updateQxDefect(QxDefect qxDefect)
    {
        return qxDefectMapper.updateQxDefect(qxDefect);
    }

    /**
     * 批量删除缺陷定义
     * 
     * @param defectCodes 需要删除的缺陷定义主键
     * @return 结果
     */
    @Override
    public int deleteQxDefectByDefectCodes(String[] defectCodes)
    {
        return qxDefectMapper.deleteQxDefectByDefectCodes(defectCodes);
    }

    /**
     * 删除缺陷定义信息
     * 
     * @param defectCode 缺陷定义主键
     * @return 结果
     */
    @Override
    public int deleteQxDefectByDefectCode(String defectCode)
    {
        return qxDefectMapper.deleteQxDefectByDefectCode(defectCode);
    }
}
